/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.openbrew.openbrewrf;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author chapmand
 */
@Entity
@Table(name = "InventoryUpdateLog")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "InventoryUpdateLog.findAll", query = "SELECT i FROM InventoryUpdateLog i"),
    @NamedQuery(name = "InventoryUpdateLog.findByInvLogID", query = "SELECT i FROM InventoryUpdateLog i WHERE i.invLogID = :invLogID"),
    @NamedQuery(name = "InventoryUpdateLog.findByInvVal", query = "SELECT i FROM InventoryUpdateLog i WHERE i.invVal = :invVal"),
    @NamedQuery(name = "InventoryUpdateLog.findByInvDate", query = "SELECT i FROM InventoryUpdateLog i WHERE i.invDate = :invDate"),
    @NamedQuery(name = "InventoryUpdateLog.findByInvEmpID", query = "SELECT i FROM InventoryUpdateLog i WHERE i.invEmpID = :invEmpID")})
public class InventoryUpdateLog implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "InvLogID")
    private Integer invLogID;
    @Basic(optional = false)
    @NotNull
    @Size(min = 0, max = 250)
    @Column(name = "InvVal")
    private String invVal;
    @Basic(optional = false)
    @NotNull
    @Column(name = "InvDate")
    @Temporal(TemporalType.DATE)
    private Date invDate;
    @Basic(optional = false)
    @NotNull
    @Column(name = "InvEmpID")
    private int invEmpID;

    public InventoryUpdateLog() {
    }

    public InventoryUpdateLog(Integer invLogID) {
        this.invLogID = invLogID;
    }

    public InventoryUpdateLog(Integer invLogID, String invVal, Date invDate, int invEmpID) {
        this.invLogID = invLogID;
        this.invVal = invVal;
        this.invDate = invDate;
        this.invEmpID = invEmpID;
    }

    public Integer getInvLogID() {
        return invLogID;
    }

    public void setInvLogID(Integer invLogID) {
        this.invLogID = invLogID;
    }

    public String getInvVal() {
        return invVal;
    }

    public void setInvVal(String invVal) {
        this.invVal = invVal;
    }

    public Date getInvDate() {
        return invDate;
    }

    public void setInvDate(Date invDate) {
        this.invDate = invDate;
    }

    public int getInvEmpID() {
        return invEmpID;
    }

    public void setInvEmpID(int invEmpID) {
        this.invEmpID = invEmpID;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (invLogID != null ? invLogID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof InventoryUpdateLog)) {
            return false;
        }
        InventoryUpdateLog other = (InventoryUpdateLog) object;
        if ((this.invLogID == null && other.invLogID != null) || (this.invLogID != null && !this.invLogID.equals(other.invLogID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.openbrew.openbrewrf.InventoryUpdateLog[ invLogID=" + invLogID + " ]";
    }
    
}
